<div class="HelpDiv">
	<div class="HelpDivHead">
		<div class="HelpTitle">基础服务</div>
		<div class="HelpMenu">
		  <div><a href="#Explanation">要求说明</a></div>
		  <div><a href="#Entity">实体服务</a></div>
		  <div><a href="#Other">基础服务</a></div>
		</div>
	</div>

	<div class="HelpBody">
		<div>
			<div id="Explanation" class="HelpBodyBig">要求说明</div>
			<div class="HelpBodyMiddle">1，访问链接以“/api/entity、/api/base”等开头的服务全部需要身份验证才能访问</div>
			<div class="HelpBodyMiddle">
				2，传入参数有统一标准，下面的所有服务将遵守该标准：<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;属性名1: 属性值1,<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;......<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;属性名N: 属性值N<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
			</div>
			<div class="HelpBodyMiddle">
				3，返回结果有统一标准，无论执行成功还是失败，下面的所有服务将遵守该标准：<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Data: data,&nbsp;&nbsp;&nbsp;&nbsp;//正确返回结果<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Error: err&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//正确返回结果//失败返回结果<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果Error属性值为null或者没有（undefined），表示执行成功，否则失败，Error包含如下信息：<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;leval: 0,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//整型，错误级别，值越小，级别越高<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;title: 'XXX',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//标题信息<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message: 'XXX'&nbsp;&nbsp;&nbsp;&nbsp;//错误信息描述<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
			</div>
			<div class="HelpBodyMiddle">4，全是异步调用</div>
		</div>

		<br>
		<div>
			<div id="Entity" class="HelpBodyBig">实体服务</div>
			<div class="HelpBodyMiddle">/api/entity/save，保存数据</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">Records</div>
				<div>记录集合</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/saves，批量保存多个实体数据，将会有事务回滚机制保护数据一致性</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityRecords</div>
				<div>
					[{<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityName: 'XXX',&nbsp;&nbsp;&nbsp;&nbsp;//实体名称<br>
		            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Records: [Record]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//记录集合<br>
		            }]
		        </div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/updateByValue，按条件批量更新记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>Condition</div>
				<div>更新条件</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">Value</div>
				<div>更新值</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/delete，按条件批量删除记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>Condition</div>
				<div>删除条件</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/deletes，按多个条件批量删除记录，或的关系</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>Conditions</div>
				<div>数组类型，条件集合</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/deleteById，按_id删除记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">ID</div>
				<div>Record._id</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/deleteByIds，按_id集合批量删除记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">IDs</div>
				<div>数组类型，[Record._id]</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/find，按条件查找记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>Condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>OrderBy</div>
				<div>排序条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>Populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/findById，按_id查找记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">ID</div>
				<div>Record._id</div>
			</div>
			<div class="HelpBodySmall">
				<div>Populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/findOne，按条件查找一条记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>Condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>Populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/search，全文检索记录，本查询需开启数据库全文检索功能</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">Text</div>
				<div>需要检索的文本</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">Condition</div>
				<div>过滤条件，例如：{Code: 'XXX'}</div>
			</div>
			<div class="HelpBodySmall">
				<div>Limit</div>
				<div>返回限制条数</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/pageQuery，按页查找记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>Condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>OrderBy</div>
				<div>排序条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>Populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">PageNum</div>
				<div>页号，页索引从0开始</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">PageSize</div>
				<div>每页记录条数</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/queryRecordCount，按条件查找记录条数</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>Condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodyMiddle">/api/entity/findRecordIndex，按条件查找记录在实体表中的索引位置，主要用于卡片翻页功能</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">EntityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">ID</div>
				<div>Record._id</div>
			</div>
			<div class="HelpBodySmall">
				<div>Condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>OrderBy</div>
				<div>排序条件</div>
			</div>
		</div>

		<br>
		<div>
			<div id="Other" class="HelpBodyBig">其他服务</div>
			<div class="HelpBodyMiddle">/api/SystemManage/getExtendEnum，获取扩展枚举信息</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">Code</div>
				<div>扩展枚举编码</div>
			</div>
			<div class="HelpBodyMiddle">返回结果：</div>
			<div class="HelpBodySmall">{<br>
				&nbsp;&nbsp;&nbsp;&nbsp;Enum0:&nbsp;{<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name: 'XXX',&nbsp;&nbsp;&nbsp;&nbsp;//名称<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Value: 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//值<br>
				&nbsp;&nbsp;&nbsp;&nbsp;},<br>
				&nbsp;&nbsp;&nbsp;&nbsp;......<br>
				&nbsp;&nbsp;&nbsp;&nbsp;EnumN:&nbsp;{<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name: 'XXX',<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Value: N<br>
				&nbsp;&nbsp;&nbsp;&nbsp;},<br>
				}
			</div>
			<div class="HelpBodyMiddle">/api/SystemManage/getParameterValue，获取系统参数值</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">Code</div>
				<div>系统参数编码</div>
			</div>
			<div class="HelpBodyMiddle">/api/base/uploadFile，上传文件，设置较为复杂，这里不好说明，请参见样例</div>
			<div class="HelpBodyMiddle">/api/base/downloadFile，下载文件，从别的服务器下载</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">ServerPath</div>
				<div>文件服务器下载地址，包括IP、端口、Api</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty" style="width:140px;">DownloadFileName</div>
				<div>文件服务器文件全名</div>
			</div>
			<div class="HelpBodySmall">
				<div>FileName</div>
				<div>本地保存文件名，可空，为空时以源文件名称命名</div>
			</div>
			<div class="HelpBodySmall">
				<div>DeleteFileName</div>
				<div>本地要删除的文件名，可为空</div>
			</div>
			<div class="HelpBodySmall">
				<div>SocketId</div>
				<div>如果需要向前端发送下载过程信息，传入该值，通过Socket发送通知</div>
			</div>
			<div class="HelpBodyMiddle">/api/base/getFileStream，从本地服务器获取文件流</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">FileName</div>
				<div>文件全名</div>
			</div>
			<div class="HelpBodyMiddle">/api/base/fileRenames，重命名文件</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">FilePaths</div>
				<div>
					[{<br>
					&nbsp;&nbsp;&nbsp;&nbsp;OldPath:&nbsp;'文件路径+全名',<br>
					&nbsp;&nbsp;&nbsp;&nbsp;NewPath:&nbsp;"新文件路径+全名"<br>
					}]
				</div>
			</div>
			<div class="HelpBodyMiddle">/api/base/fileDeletes，删除文件</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">FilePaths</div>
				<div>
					[{<br>
					&nbsp;&nbsp;&nbsp;&nbsp;OldPath:&nbsp;'文件路径+全名',<br>
					}]
				</div>
			</div>
		</div>
	</div>
</div>